#ifndef MYARRAY_H
#define MYARRAY_H

#include <iostream>
#include <cassert>
#include <algorithm>

class MyArray {
private:
    int* p;   
    int N;    

public:
    explicit MyArray(int n = 0);
    MyArray(const MyArray& other);

    ~MyArray();

    MyArray& operator=(const MyArray& other);

    MyArray merge(const MyArray& other) const;

    MyArray add(const MyArray& other) const;     
    MyArray subtract(const MyArray& other) const; 
    MyArray multiply(const MyArray& other) const;
    MyArray divide(const MyArray& other) const;   

    int getSize() const;                          
    int& operator[](int index);                  
    const int& operator[](int index) const;    
};

#endif // MYARRAY_H